Skip to content

Add opt-in AI output threat model - #22810

Draft
jacknojo wants to merge 1 commit into
mainfrom
jacknojo-llm-output-threat-model
Draft

jacknojo wants to merge 1 commit into
mainfrom
jacknojo-llm-output-threat-model

Conversation

@jacknojo

Copy link
Copy Markdown
Contributor

Summary

Introduce the shared ai threat-model kind for output generated by large language models (LLMs). This establishes the configuration support for follow-up source models and queries, without adding third-party library models or new queries.

  • Register ai under all, making it a known, independently configurable threat-model kind. It remains disabled by default.
  • Document the new opt-in kind and add a change note for codeql/threat-models.
  • Add a regression test that explicitly enables ai and requires both knownThreatModel("ai") and currentThreatModel("ai") to hold. The existing default-configuration test confirms that ai is not enabled by default.

No new QL framework logic is necessary: the existing threat-model implementation derives known kinds and configuration behavior from the shared grouping table.

Validation

Both tests passed with the CodeQL CLI:

codeql test run \
  javascript/ql/test/library-tests/threat-models/ai-enabled \
  javascript/ql/test/library-tests/threat-models/default

Register ai as a shared threat model, document its scope, and add a regression test for explicit enablement.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3b1133f4-388a-4e13-a00f-dce2b41cd295

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant